/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;

/** Generated Model for hrm_statement
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_hrm_statement extends PO implements I_hrm_statement, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20130116L;

    /** the default Constructor */
    public X_hrm_statement(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_hrm_statement (Properties ctx, int hrm_statement_ID, String trxName)
    {
      super (ctx, hrm_statement_ID, trxName);
      /** if (hrm_statement_ID == 0)
        {
			setDateFrom (new Timestamp( System.currentTimeMillis() ));
			sethrm_PaymentProcess (null);
// N
			sethrm_settingsPayments_ID (0);
			sethrm_statement_ID (0);
			sethrm_total (Env.ZERO);
// 0
			sethrm_typeOperation (null);
			setName (null);
			setValue (null);
        } */
    }

    /** Load Constructor */
    public X_hrm_statement (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_hrm_statement[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_C_Payment getC_Payment() throws RuntimeException
    {
		return (org.compiere.model.I_C_Payment)MTable.get(getCtx(), org.compiere.model.I_C_Payment.Table_Name)
			.getPO(getC_Payment_ID(), get_TrxName());	}

	/** Set Payment.
		@param C_Payment_ID 
		Payment identifier
	  */
	public void setC_Payment_ID (int C_Payment_ID)
	{
		if (C_Payment_ID < 1) 
			set_Value (COLUMNNAME_C_Payment_ID, null);
		else 
			set_Value (COLUMNNAME_C_Payment_ID, Integer.valueOf(C_Payment_ID));
	}

	/** Get Payment.
		@return Payment identifier
	  */
	public int getC_Payment_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Date From.
		@param DateFrom 
		Starting date for a range
	  */
	public void setDateFrom (Timestamp DateFrom)
	{
		set_Value (COLUMNNAME_DateFrom, DateFrom);
	}

	/** Get Date From.
		@return Starting date for a range
	  */
	public Timestamp getDateFrom () 
	{
		return (Timestamp)get_Value(COLUMNNAME_DateFrom);
	}

	/** Set Description.
		@param Description 
		Optional short description of the record
	  */
	public void setDescription (String Description)
	{
		set_Value (COLUMNNAME_Description, Description);
	}

	/** Get Description.
		@return Optional short description of the record
	  */
	public String getDescription () 
	{
		return (String)get_Value(COLUMNNAME_Description);
	}

	public I_hrm_bonus gethrm_bonus() throws RuntimeException
    {
		return (I_hrm_bonus)MTable.get(getCtx(), I_hrm_bonus.Table_Name)
			.getPO(gethrm_bonus_ID(), get_TrxName());	}

	/** Set hrm_bonus.
		@param hrm_bonus_ID hrm_bonus	  */
	public void sethrm_bonus_ID (int hrm_bonus_ID)
	{
		if (hrm_bonus_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_bonus_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_bonus_ID, Integer.valueOf(hrm_bonus_ID));
	}

	/** Get hrm_bonus.
		@return hrm_bonus	  */
	public int gethrm_bonus_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_bonus_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public I_hrm_businesstrip gethrm_businesstrip() throws RuntimeException
    {
		return (I_hrm_businesstrip)MTable.get(getCtx(), I_hrm_businesstrip.Table_Name)
			.getPO(gethrm_businesstrip_ID(), get_TrxName());	}

	/** Set hrm_businesstrip.
		@param hrm_businesstrip_ID hrm_businesstrip	  */
	public void sethrm_businesstrip_ID (int hrm_businesstrip_ID)
	{
		if (hrm_businesstrip_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_businesstrip_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_businesstrip_ID, Integer.valueOf(hrm_businesstrip_ID));
	}

	/** Get hrm_businesstrip.
		@return hrm_businesstrip	  */
	public int gethrm_businesstrip_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_businesstrip_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public I_hrm_materialaid gethrm_materialaid() throws RuntimeException
    {
		return (I_hrm_materialaid)MTable.get(getCtx(), I_hrm_materialaid.Table_Name)
			.getPO(gethrm_materialaid_ID(), get_TrxName());	}

	/** Set hrm_materialaid.
		@param hrm_materialaid_ID hrm_materialaid	  */
	public void sethrm_materialaid_ID (int hrm_materialaid_ID)
	{
		if (hrm_materialaid_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_materialaid_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_materialaid_ID, Integer.valueOf(hrm_materialaid_ID));
	}

	/** Get hrm_materialaid.
		@return hrm_materialaid	  */
	public int gethrm_materialaid_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_materialaid_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public I_hrm_payment gethrm_payment() throws RuntimeException
    {
		return (I_hrm_payment)MTable.get(getCtx(), I_hrm_payment.Table_Name)
			.getPO(gethrm_payment_ID(), get_TrxName());	}

	/** Set hrm_payment.
		@param hrm_payment_ID hrm_payment	  */
	public void sethrm_payment_ID (int hrm_payment_ID)
	{
		if (hrm_payment_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_payment_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_payment_ID, Integer.valueOf(hrm_payment_ID));
	}

	/** Get hrm_payment.
		@return hrm_payment	  */
	public int gethrm_payment_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_payment_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hrm_PaymentProcess.
		@param hrm_PaymentProcess hrm_PaymentProcess	  */
	public void sethrm_PaymentProcess (String hrm_PaymentProcess)
	{
		set_Value (COLUMNNAME_hrm_PaymentProcess, hrm_PaymentProcess);
	}

	/** Get hrm_PaymentProcess.
		@return hrm_PaymentProcess	  */
	public String gethrm_PaymentProcess () 
	{
		return (String)get_Value(COLUMNNAME_hrm_PaymentProcess);
	}

	public I_hrm_review gethrm_review() throws RuntimeException
    {
		return (I_hrm_review)MTable.get(getCtx(), I_hrm_review.Table_Name)
			.getPO(gethrm_review_ID(), get_TrxName());	}

	/** Set hrm_review.
		@param hrm_review_ID hrm_review	  */
	public void sethrm_review_ID (int hrm_review_ID)
	{
		if (hrm_review_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_review_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_review_ID, Integer.valueOf(hrm_review_ID));
	}

	/** Get hrm_review.
		@return hrm_review	  */
	public int gethrm_review_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_review_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public I_hrm_settingsPayments gethrm_settingsPayments() throws RuntimeException
    {
		return (I_hrm_settingsPayments)MTable.get(getCtx(), I_hrm_settingsPayments.Table_Name)
			.getPO(gethrm_settingsPayments_ID(), get_TrxName());	}

	/** Set hrm_settingsPayments.
		@param hrm_settingsPayments_ID hrm_settingsPayments	  */
	public void sethrm_settingsPayments_ID (int hrm_settingsPayments_ID)
	{
		if (hrm_settingsPayments_ID < 1) 
			set_Value (COLUMNNAME_hrm_settingsPayments_ID, null);
		else 
			set_Value (COLUMNNAME_hrm_settingsPayments_ID, Integer.valueOf(hrm_settingsPayments_ID));
	}

	/** Get hrm_settingsPayments.
		@return hrm_settingsPayments	  */
	public int gethrm_settingsPayments_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_settingsPayments_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hrm_statement.
		@param hrm_statement_ID hrm_statement	  */
	public void sethrm_statement_ID (int hrm_statement_ID)
	{
		if (hrm_statement_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_statement_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_statement_ID, Integer.valueOf(hrm_statement_ID));
	}

	/** Get hrm_statement.
		@return hrm_statement	  */
	public int gethrm_statement_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_statement_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set total amount.
		@param hrm_total total amount	  */
	public void sethrm_total (BigDecimal hrm_total)
	{
		set_Value (COLUMNNAME_hrm_total, hrm_total);
	}

	/** Get total amount.
		@return total amount	  */
	public BigDecimal gethrm_total () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_total);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** hrm_typeOperation AD_Reference_ID=1000118 */
	public static final int HRM_TYPEOPERATION_AD_Reference_ID=1000118;
	/** BONUS = BONUS */
	public static final String HRM_TYPEOPERATION_BONUS = "BONUS";
	/** BUSINESSTRIP = BUSINESSTRIP */
	public static final String HRM_TYPEOPERATION_BUSINESSTRIP = "BUSINESSTRIP";
	/** MATERIALAID = MATERIALAID */
	public static final String HRM_TYPEOPERATION_MATERIALAID = "MATERIALAID";
	/** REVIEW = REVIEW */
	public static final String HRM_TYPEOPERATION_REVIEW = "REVIEW";
	/** VACATION = VACATION */
	public static final String HRM_TYPEOPERATION_VACATION = "VACATION";
	/** CNALOG = CNALOG */
	public static final String HRM_TYPEOPERATION_CNALOG = "CNALOG";
	/** COTCH = COTCH */
	public static final String HRM_TYPEOPERATION_COTCH = "COTCH";
	/** IPN = IPN */
	public static final String HRM_TYPEOPERATION_IPN = "IPN";
	/** OPV = OPV */
	public static final String HRM_TYPEOPERATION_OPV = "OPV";
	/** SALARY = SALARY */
	public static final String HRM_TYPEOPERATION_SALARY = "SALARY";
	/** Set hrm_typeOperation.
		@param hrm_typeOperation hrm_typeOperation	  */
	public void sethrm_typeOperation (String hrm_typeOperation)
	{

		set_ValueNoCheck (COLUMNNAME_hrm_typeOperation, hrm_typeOperation);
	}

	/** Get hrm_typeOperation.
		@return hrm_typeOperation	  */
	public String gethrm_typeOperation () 
	{
		return (String)get_Value(COLUMNNAME_hrm_typeOperation);
	}

	public I_hrm_vacation gethrm_vacation() throws RuntimeException
    {
		return (I_hrm_vacation)MTable.get(getCtx(), I_hrm_vacation.Table_Name)
			.getPO(gethrm_vacation_ID(), get_TrxName());	}

	/** Set hrm_vacation.
		@param hrm_vacation_ID hrm_vacation	  */
	public void sethrm_vacation_ID (int hrm_vacation_ID)
	{
		if (hrm_vacation_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_vacation_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_vacation_ID, Integer.valueOf(hrm_vacation_ID));
	}

	/** Get hrm_vacation.
		@return hrm_vacation	  */
	public int gethrm_vacation_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_vacation_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Name.
		@param Name 
		Alphanumeric identifier of the entity
	  */
	public void setName (String Name)
	{
		set_Value (COLUMNNAME_Name, Name);
	}

	/** Get Name.
		@return Alphanumeric identifier of the entity
	  */
	public String getName () 
	{
		return (String)get_Value(COLUMNNAME_Name);
	}

	/** Set Processed.
		@param Processed 
		The document has been processed
	  */
	public void setProcessed (boolean Processed)
	{
		set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
	}

	/** Get Processed.
		@return The document has been processed
	  */
	public boolean isProcessed () 
	{
		Object oo = get_Value(COLUMNNAME_Processed);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/** Set Search Key.
		@param Value 
		Search key for the record in the format required - must be unique
	  */
	public void setValue (String Value)
	{
		set_ValueNoCheck (COLUMNNAME_Value, Value);
	}

	/** Get Search Key.
		@return Search key for the record in the format required - must be unique
	  */
	public String getValue () 
	{
		return (String)get_Value(COLUMNNAME_Value);
	}
}